package com.lxz.datasource.config.druid;

public class DataSourceContextHolder {
	public static final String Mater = "master";
	public static final String Slave = "slave";

	private static final ThreadLocal<String> contextHolder = new ThreadLocal<>();

	public static void setDataSource(String name) {
		contextHolder.set(name);
	}

	public static String getDataSource() {
		return contextHolder.get();
	}

	public static void cleanDataSource() {
		contextHolder.remove();
	}

}
